Skip to content

Conversation

@jenniferjiangkells
Copy link
Member

@jenniferjiangkells jenniferjiangkells commented Feb 13, 2025

Description

Addresses #112

Changes

  • Add fhir.resources as a dependency
  • Removed fhir_resources and replaced usage with fhir.resource library
  • Removed CcdData, CdsFhirData, Concept and replaced with native use of FHIR resources and usages in several modules:
    • CdaAnnotator
    • data_generators
    • io.connectors
    • use_cases
  • Renamed Document.hl7 -> Document.fhir for more accurate description and removed Document.concepts as no longer needed
  • HL7Data -> FhirData along with updated methods to access bundle and cds FHIR resources.
  • Use setters and getters for properties in Document
  • CDS prefetch data generator is closer to specification ({prefetch_key_name: Resource}) instead of everything in one Bundle and uses a Prefetch pydantic model for validation
  • Updated and moved SpacyNLP._add_concepts_to_hc_doc-> Document.update_problem_list_from_nlp() for better separation of concerns and usage
  • Added a fhir module with helper functions that make it easier to create and access data in FHIR resources
  • Added a .model_dump() method to CDSRequest that serializes bytes and datetime objects in FHIR resources. This is a workaround as it's better to use .model_dump_json() for serialization, but there is an issue in Pydantic v2 where timezones don't get dumped correctly. Timezone information is required for FHIR.
  • Updated tests and docs

@jenniferjiangkells jenniferjiangkells linked an issue Feb 13, 2025 that may be closed by this pull request
@jenniferjiangkells jenniferjiangkells marked this pull request as ready for review February 21, 2025 14:52
@jenniferjiangkells jenniferjiangkells self-assigned this Mar 4, 2025
@jenniferjiangkells jenniferjiangkells merged commit b518e72 into main Mar 5, 2025
5 checks passed
@jenniferjiangkells jenniferjiangkells deleted the feature/fhir-native-data branch April 23, 2025 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FHIR-native data representation

2 participants